home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / amicvs1-0.lha / AmiCVS / emacs / lisp-adds / pcl-cvs / cookie.elc < prev    next >
Encoding:
Text File  |  1994-11-04  |  23.0 KB  |  393 lines

  1.  
  2. (require (quote dll))
  3.  
  4. (provide (quote cookie))
  5.  
  6. (put (quote icookie-set-buffer-bind-dll) (quote lisp-indent-hook) 1)
  7.  
  8. (defmacro icookie-set-buffer-bind-dll (collection &rest forms) (byte-code "ÄÅ!ÄÆ!ÇÈD    
  9. DÉÊ    DDEËÌ    DDÍÎÏ \"ËDEF*‡" [old-buffer hnd collection forms make-symbol "old-buffer" "collection" let* (current-buffer) dll icookie-collection->dll set-buffer icookie-collection->buffer unwind-protect append (progn)] 10))
  10.  
  11. (put (quote icookie-set-buffer-bind-dll-let*) (quote lisp-indent-hook) 2)
  12.  
  13. (defmacro icookie-set-buffer-bind-dll-let* (collection varlist &rest forms) (byte-code "ÅÆ!ÅÇ!ÈÉÊD    
  14. DËÌ    DDE \"ÍΠ   DDÏÉÐ \"ÍDEF*‡" [old-buffer hnd collection varlist forms make-symbol "old-buffer" "collection" let* append (current-buffer) dll icookie-collection->dll set-buffer icookie-collection->buffer unwind-protect (progn)] 11))
  15.  
  16. (defmacro icookie-filter-hf (collection tin) (byte-code "ÄÅ!ÄÆ!Ç
  17. D     DDÈÉÊË    DEÊÌ    DEEÍFE*‡" [tempvar tmpcoll tin collection make-symbol "tin" "tmpcollection" let if or eq icookie-collection->header icookie-collection->footer nil] 11))
  18.  
  19. (defun icookie-create-wrapper (start-marker cookie) (byte-code "Âà   \"B‡" [start-marker cookie WRAPPER vector] 4))
  20.  
  21. (defun icookie-wrapper->start-marker (wrapper) (byte-code "ÁAÂ\"‡" [wrapper elt 0] 3))
  22.  
  23. (defun icookie-wrapper->cookie-safe (wrapper) (byte-code "ÁAÂ\"‡" [wrapper elt 1] 3))
  24.  
  25. (defun icookie-wrapper->cookie (wrapper) (byte-code "ÁAÂ\"‡" [wrapper elt 1] 3))
  26.  
  27. (defun icookie-create-collection (buffer pretty-printer header-wrapper footer-wrapper dll) (byte-code "ÆÇ    
  28. Å&B‡" [buffer pretty-printer header-wrapper footer-wrapper dll nil COLLECTION vector] 8))
  29.  
  30. (defun icookie-collection->buffer (collection) (byte-code "ÁAÂ\"‡" [collection elt 0] 3))
  31.  
  32. (defun icookie-collection->pretty-printer (collection) (byte-code "ÁAÂ\"‡" [collection elt 1] 3))
  33.  
  34. (defun icookie-collection->header (collection) (byte-code "ÁAÂ\"‡" [collection elt 2] 3))
  35.  
  36. (defun icookie-collection->footer (collection) (byte-code "ÁAÂ\"‡" [collection elt 3] 3))
  37.  
  38. (defun icookie-collection->dll (collection) (byte-code "ÁAÂ\"‡" [collection elt 4] 3))
  39.  
  40. (defun icookie-collection->last-tin (collection) (byte-code "ÁAÂ\"‡" [collection elt 5] 3))
  41.  
  42. (defun icookie-set-collection->buffer (collection buffer) (byte-code "A    I‡" [collection buffer 0] 3))
  43.  
  44. (defun icookie-set-collection->pretty-printer (collection pretty-printer) (byte-code "A    I‡" [collection pretty-printer 1] 3))
  45.  
  46. (defun icookie-set-collection->header (collection header) (byte-code "A    I‡" [collection header 2] 3))
  47.  
  48. (defun icookie-set-collection->footer (collection footer) (byte-code "A    I‡" [collection footer 3] 3))
  49.  
  50. (defun icookie-set-collection->dll (collection dll) (byte-code "A    I‡" [collection dll 4] 3))
  51.  
  52. (defun icookie-set-collection->last-tin (collection last-tin) (byte-code "A    I‡" [collection last-tin 5] 3))
  53.  
  54. (defun icookie-abs (x) (byte-code "[]‡" [x] 2))
  55.  
  56. (defun icookie-create-wrapper-and-insert (cookie string pos) (byte-code "ŠbˆÆ!ƒÇ!‚ÃÈ !ˆÈÉ!ˆÊË    !\"*)‡" [pos start buffer-read-only nil string cookie markerp marker-position insert-before-markers 10 icookie-create-wrapper copy-marker] 8))
  57.  
  58. (defun icookie-create-wrapper-and-pretty-print (cookie pretty-printer pos) (byte-code "ŠbˆÆ!ƒÇ!‚ÃÈÉ!ˆÊË!ˆÌ \"ˆÍΠ   !\"*)‡" [pos start buffer-read-only nil pretty-printer cookie markerp marker-position insert-before-markers 10 backward-char 1 funcall icookie-create-wrapper copy-marker] 9))
  59.  
  60. (defun icookie-delete-tin-internal (collection tin) (byte-code "Å    !ÃÆ    ! =…Ç    Ã\"ˆÈÉ ÊH!ÉË \"ÊH!\"ˆÌÉ ÊH!Ã\"ˆÍ \"*‡" [dll collection buffer-read-only nil tin icookie-collection->dll icookie-collection->last-tin icookie-set-collection->last-tin delete-region icookie-wrapper->start-marker 2 dll-next set-marker dll-delete] 12))
  61.  
  62. (defun icookie-refresh-tin (collection tin) (byte-code "ÁŠÅÆ
  63. ÇH!ÈÆÉ
  64. \"ÇH!!S\"ˆÆ
  65. ÇH!bˆÊË !Ì
  66. ÇH!\"))‡" [buffer-read-only nil tin dll collection delete-region icookie-wrapper->start-marker 2 marker-position dll-next funcall icookie-collection->pretty-printer icookie-wrapper->cookie] 12))
  67.  
  68. (defun icookie-pos-before-middle-p (collection pos tin1 tin2) (byte-code "Å    !
  69. ÆÇ ÈH!Ç ÈH!\\È\"W)‡" [dll collection pos tin1 tin2 icookie-collection->dll / icookie-wrapper->start-marker 2] 8))
  70.  
  71. (defun collection-create (buffer pretty-printer &optional header footer pos) "\
  72. Create an empty collection of cookies.
  73. Args: BUFFER PRETTY-PRINTER &optional HEADER FOOTER POS.
  74.  
  75. The collection will be inserted in BUFFER. BUFFER may be a
  76. buffer or a buffer name. It is created if it does not exist.
  77.  
  78. PRETTY-PRINTER should be a function that takes one argument, a
  79. cookie, and inserts a string representing it in the buffer (at
  80. point). The string PRETTY-PRINTER inserts may be empty or span
  81. several linse. A trailing newline will always be inserted
  82. automatically. The PRETTY-PRINTER should use insert, and not
  83. insert-before-markers.
  84.  
  85. Optional third argument HEADER is a string that will always be
  86. present at the top of the collection. HEADER should end with a
  87. newline.  Optionaly fourth argument FOOTER is similar, and will
  88. always be inserted at the bottom of the collection.
  89.  
  90. Optional fifth argument POS is a buffer position, specifying
  91. where the collection will be inserted. It defaults to the
  92. begining of the buffer." (byte-code "ÌÍ    !
  93. ÃÃΠ%pÏ!Ð!qˆÑŽ?…%҉ˆ?…0҉ˆ    ?ƒ>e‰    ‚LÓ    !…L    Ô    !LˆÕ    #Õ    # 
  94. Ö \"ˆ×
  95. \"ˆØÙÚ\"\"ˆÛÙÜ\"\"*)+ˆ)‡" [new-collection buffer pretty-printer nil old-buffer collection dll header footer pos foot head icookie-create-collection get-buffer-create dll-create icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) "" markerp marker-position icookie-create-wrapper-and-insert dll-enter-first dll-enter-last icookie-set-collection->header dll-nth 0 icookie-set-collection->footer -1] 18))
  96.  
  97. (defun tin-cookie (collection tin) "\
  98. Get the cookie from a TIN. Args: COLLECTION TIN." (byte-code "ÁÂH!‡" [tin icookie-wrapper->cookie 2] 3))
  99.  
  100. (defun cookie-enter-first (collection cookie) "\
  101. Enter a COOKIE first in the cookie collection COLLECTION.
  102. Args: COLLECTION COOKIE." (byte-code "p
  103. Å    !Æ    !qˆÇŽÈ É Ê\"Ë Ì
  104. !ÍÉ Î\"ÏH!##)+‡" [old-buffer collection collection dll cookie icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) dll-enter-after dll-nth 0 icookie-create-wrapper-and-pretty-print icookie-collection->pretty-printer icookie-wrapper->start-marker 1 2] 14))
  105.  
  106. (defun cookie-enter-last (collection cookie) "\
  107. Enter a COOKIE last in the cookie-collection COLLECTION.
  108. Args: COLLECTION COOKIE." (byte-code "p
  109. Å    !Æ    !qˆÇŽÈ É Ê\"Ë Ì
  110. !ÍÎ !!##)+‡" [old-buffer collection collection dll cookie icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) dll-enter-before dll-nth -1 icookie-create-wrapper-and-pretty-print icookie-collection->pretty-printer icookie-wrapper->start-marker dll-last] 13))
  111.  
  112. (defun cookie-enter-after-tin (collection tin cookie) "\
  113. Enter a new COOKIE after TIN.
  114. Args: COLLECTION TIN COOKIE." (byte-code "p
  115. Æ    !Ç    !qˆÈŽÉ ÊË
  116. !ÌÍ \"ÎH!##)+‡" [old-buffer collection collection dll tin cookie icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) dll-enter-after icookie-create-wrapper-and-pretty-print icookie-collection->pretty-printer icookie-wrapper->start-marker dll-next 2] 13))
  117.  
  118. (defun cookie-enter-before-tin (collection tin cookie) "\
  119. Enter a new COOKIE before TIN.
  120. Args: COLLECTION TIN COOKIE." (byte-code "p
  121. Æ    !Ç    !qˆÈŽÉ ÊË
  122. !Ì ÍH!##)+‡" [old-buffer collection collection dll tin cookie icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) dll-enter-before icookie-create-wrapper-and-pretty-print icookie-collection->pretty-printer icookie-wrapper->start-marker 2] 12))
  123.  
  124. (defun tin-next (collection tin) "\
  125. Get the next tin. Args: COLLECTION TIN.
  126. Returns nil if TIN is nil or the last cookie." (byte-code "ƒ&ÅÆ
  127. !\"
  128.     Ç !=†    È !=ƒ!Ă\"    *‚'ć" [tin tin collection tmpcollection nil dll-next icookie-collection->dll icookie-collection->header icookie-collection->footer] 6))
  129.  
  130. (defun tin-previous (collection tin) "\
  131. Get the previous tin. Args: COLLECTION TIN.
  132. Returns nil if TIN is nil or the first cookie." (byte-code "ƒ&ÅÆ
  133. !\"
  134.     Ç !=†    È !=ƒ!Ă\"    *‚'ć" [tin tin collection tmpcollection nil dll-previous icookie-collection->dll icookie-collection->header icookie-collection->footer] 6))
  135.  
  136. (defun tin-nth (collection n) "\
  137. Return the Nth tin. Args: COLLECTION N.
  138. N counts from zero. Nil is returned if there is less than N cookies.
  139. If N is negative, return the -(N+1)th last element.
  140. Thus, (tin-nth dll 0) returns the first node,
  141. and (tin-nth dll -1) returns the last node.
  142.  
  143. Use tin-cookie to extract the cookie from the tin (or use
  144. cookie-nth instead)." (byte-code "ÅWƒS‰‚T‰ˆÆÇ
  145. !\"
  146.     È !=†(    É !=ƒ/Ă0    *‡" [n tin collection tmpcollection nil 0 dll-nth icookie-collection->dll icookie-collection->header icookie-collection->footer] 6))
  147.  
  148. (defun cookie-nth (collection n) "\
  149. Return the Nth cookie. Args: COLLECTION N.
  150. N counts from zero. Nil is returned if there is less than N cookies.
  151. If N is negative, return the -(N+1)th last element.
  152. Thus, (cookie-nth dll 0) returns the first cookie,
  153. and (cookie-nth dll -1) returns the last cookie." (byte-code "ÇWƒS‰‚T‰ˆÈ
  154. !É    \"
  155.  Ê!=†* Ë!=ƒ1Ƃ2 * ƒ@Ì ÍH!‚AÆ*‡" [n dll collection tin tin tmpcollection nil 0 icookie-collection->dll dll-nth icookie-collection->header icookie-collection->footer icookie-wrapper->cookie 2] 7))
  156.  
  157. (defun tin-delete (collection tin) "\
  158. Delete a tin from a collection. Args: COLLECTION TIN.
  159. The cookie in the tin is returned." (byte-code "p
  160. Å    !Æ    !qˆÇŽÈÉ
  161. \"!)+‡" [old-buffer collection collection dll tin icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) icookie-wrapper->cookie icookie-delete-tin-internal] 6))
  162.  
  163. (defun cookie-delete-first (collection) "\
  164. Delete first cookie and return it. Args: COLLECTION.
  165. Returns nil if there are no cookies left in the collection." (byte-code "p
  166. Æ    !Ç È\"É    !qˆÊŽ Ë
  167. !=ƒ Å‚&ÌÍ
  168. \"!),‡" [old-buffer collection collection dll tin nil icookie-collection->dll dll-nth 1 icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) icookie-collection->footer icookie-wrapper->cookie icookie-delete-tin-internal] 8))
  169.  
  170. (defun cookie-delete-last (collection) "\
  171. Delete last cookie and return it. Args: COLLECTION.
  172. Returns nil if there is no cookie left in the collection." (byte-code "p
  173. Æ    !Ç È\"É    !qˆÊŽ Ë
  174. !=ƒ Å‚&ÌÍ
  175. \"!),‡" [old-buffer collection collection dll tin nil icookie-collection->dll dll-nth -2 icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) icookie-collection->header icookie-wrapper->cookie icookie-delete-tin-internal] 8))
  176.  
  177. (defun cookie-first (collection) "\
  178. Return the first cookie in COLLECTION. The cookie is not removed." (byte-code "Æ    !ÇÈ\"     É !=† Ê !=ƒł  *
  179. …+Ë
  180. ÌH!*‡" [dll collection tin tin tmpcollection nil icookie-collection->dll dll-nth -1 icookie-collection->header icookie-collection->footer icookie-wrapper->cookie 2] 7))
  181.  
  182. (defun cookie-last (collection) "\
  183. Return the last cookie in COLLECTION. The cookie is not removed." (byte-code "Æ    !ÇÈ\"     É !=† Ê !=ƒł  *
  184. …+Ë
  185. ÌH!*‡" [dll collection tin tin tmpcollection nil icookie-collection->dll dll-nth -2 icookie-collection->header icookie-collection->footer icookie-wrapper->cookie 2] 7))
  186.  
  187. (defun collection-empty (collection) "\
  188. Return true if there are no cookies in COLLECTION." (byte-code "ÁÂ!Ã\"Ä!=‡" [collection dll-nth icookie-collection->dll 1 icookie-collection->footer] 5))
  189.  
  190. (defun collection-length (collection) "\
  191. Return the number of cookies in COLLECTION." (byte-code "ÁÂ!!ÃZ‡" [collection dll-length icookie-collection->dll 2] 4))
  192.  
  193. (defun collection-list-cookies (collection) "\
  194. Return a list of all cookies in COLLECTION." (byte-code "p
  195. È    !ÅÉ
  196. !Ê Ë\"Ì    !qˆÍŽ=?…<ÎÏH! B‰ˆÐ \"‰ˆ‚ˆ ).‡" [old-buffer collection collection dll result nil header tin icookie-collection->dll icookie-collection->header dll-nth -2 icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) icookie-wrapper->cookie 2 dll-previous] 9))
  197.  
  198. (defun collection-clear (collection) "\
  199. Remove all cookies in COLLECTION." (byte-code "p
  200. È    !É
  201. !Ê
  202. !Ë    !qˆÌŽÇÍÎÏ Ð\"ÑH!ÎÑH!\")ˆÒ ÑHÑHD!‰ˆÓ
  203. \"ˆÔ
  204. Ï Õ\"\"ˆÖ
  205. Ï ×\"\")-‡" [old-buffer collection collection dll header footer buffer-read-only nil icookie-collection->dll icookie-collection->header icookie-collection->footer icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) delete-region icookie-wrapper->start-marker dll-nth 1 2 dll-create-from-list icookie-set-collection->dll icookie-set-collection->header 0 icookie-set-collection->footer -1] 17))
  206.  
  207. (defun cookie-map (map-function collection &rest map-args) "\
  208. Apply MAP-FUNCTION to all cookies in COLLECTION.
  209. MAP-FUNCTION is applied to the first element first.
  210. If MAP-FUNCTION returns non-nil the cookie will be refreshed (its
  211. pretty-printer will be called once again).
  212.  
  213. Note that the buffer for COLLECTION will be current buffer when MAP-FUNCTION 
  214. is called.  MAP-FUNCTION must restore the current buffer to BUFFER before 
  215. it returns, if it changes it.
  216.  
  217. If more than two arguments are given to cookie-map, remaining
  218. arguments will be passed to MAP-FUNCTION." (byte-code "p
  219. È    !É
  220. !Ê Ë\"Ì    !qˆÍŽ =?…<ÎÏÐH!#…1Ñ
  221. \"ˆÒ \"‰ˆ‚)-‡" [old-buffer collection collection dll footer tin map-function map-args icookie-collection->dll icookie-collection->footer dll-nth 1 icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) apply icookie-wrapper->cookie 2 icookie-refresh-tin dll-next] 11))
  222.  
  223. (defun cookie-map-reverse (map-function collection &rest map-args) "\
  224. Apply MAP-FUNCTION to all cookies in COLLECTION.
  225. MAP-FUNCTION is applied to the last cookie first.
  226. If MAP-FUNCTION returns non-nil the cookie will be refreshed.
  227.  
  228. Note that the buffer for COLLECTION will be current buffer when MAP-FUNCTION 
  229. is called.  MAP-FUNCTION must restore the current buffer to BUFFER before 
  230. it returns, if it changes the current buffer.
  231.  
  232. If more than two arguments are given to cookie-map, remaining
  233. arguments will be passed to MAP-FUNCTION." (byte-code "p
  234. È    !É
  235. !Ê Ë\"Ì    !qˆÍŽ =?…<ÎÏÐH!#…1Ñ
  236. \"ˆÒ \"‰ˆ‚)-‡" [old-buffer collection collection dll header tin map-function map-args icookie-collection->dll icookie-collection->header dll-nth -2 icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) apply icookie-wrapper->cookie 2 icookie-refresh-tin dll-previous] 11))
  237.  
  238. (defun collection-append-cookies (collection cookie-list) "\
  239. Insert all cookies in the list COOKIE-LIST last in COLLECTION.
  240. Args: COLLECTION COOKIE-LIST." (byte-code "…    @\"ˆA‰ˆ‚‡" [cookie-list collection cookie-enter-last] 4))
  241.  
  242. (defun collection-filter-cookies (collection predicate &rest extra-args) "\
  243. Remove all cookies in COLLECTION for which PREDICATE returns nil.
  244. Args: COLLECTION PREDICATE &rest EXTRA-ARGS.
  245. Note that the buffer for COLLECTION will be current-buffer when PREDICATE 
  246. is called. PREDICATE must restore the current buffer before it returns
  247. if it changes it.
  248.  
  249. The PREDICATE is called with the cookie as its first argument. If any
  250. EXTRA-ARGS are given to collection-filter-cookies they will be passed to the
  251. PREDICATE." (byte-code "p
  252. Ê    !Ë Ì\"Í
  253. !ÇΠ   !qˆÏŽ =?…IÐ \"‰ˆÑÒ ÓH!    #ƒ<ǂ@Ô
  254. \"ˆ‰ˆ‚).‡" [old-buffer collection collection dll tin footer next nil predicate extra-args icookie-collection->dll dll-nth 1 icookie-collection->footer icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) dll-next apply icookie-wrapper->cookie 2 icookie-delete-tin-internal] 11))
  255.  
  256. (defun collection-filter-tins (collection predicate &rest extra-args) "\
  257. Remove all cookies in COLLECTION for which PREDICATE returns nil.
  258. Note that the buffer for COLLECTION will be current-buffer when PREDICATE 
  259. is called. PREDICATE must restore the current buffer before it returns
  260. if it changes it.
  261.  
  262. The PREDICATE is called with one argument, the tin. If any EXTRA-ARGS
  263. are given to collection-filter-cookies they will be passed to the PREDICATE." (byte-code "p
  264. Ê    !Ë Ì\"Í
  265. !ÇΠ   !qˆÏŽ =?…EÐ \"‰ˆÑ     #ƒ8ǂ<Ò
  266. \"ˆ‰ˆ‚).‡" [old-buffer collection collection dll tin footer next nil predicate extra-args icookie-collection->dll dll-nth 1 icookie-collection->footer icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) dll-next apply icookie-delete-tin-internal] 10))
  267.  
  268. (defun tin-locate (collection pos &optional guess) "\
  269. Return the tin that POS (a buffer position) is within.
  270. Args: COLLECTION POS &optional GUESS.
  271. POS may be a marker or an integer.
  272. GUESS should be a tin that it is likely that POS is near.
  273.  
  274. If POS points before the first cookie, the first cookie is returned.
  275. If POS points after the last cookie, the last cookie is returned.
  276. If the COLLECTION is empty, nil is returned." (byte-code "p
  277. Í    !Î
  278. !Ï    !qˆÐŽÑ Ò\"Ñ Ó\"=ƒ#ł&ÔÑ Ò\"ÕH!Wƒ8Ñ Ò\"‚&ÔÖ !!YƒJÑ ×\"‚&Ñ Ò\"ØÔÕH!Z!    
  279. …‡
  280.  ØÔ ÕH!Z!      W…† ‰    ˆ ‰*ˆÑ Ó\" ØÔ ÕH!Z!      W…® ‰    ˆ ‰*ˆÙ
  281. !…ÜÙ
  282. ! ØÔ ÕH!Z!      W…Û ‰    ˆ ‰*ˆÔÕH!Yƒ
  283. ÔÕH!Y…Ú \"‰ˆ‚éˆÛ \"‚%ÔÕH!W…\"Û \"‰ˆ‚
  284. ˆ*),‡" [old-buffer collection collection dll footer nil pos t best-guess distance guess g d icookie-collection->dll icookie-collection->footer icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) dll-nth 1 -1 icookie-wrapper->start-marker 2 dll-last -2 icookie-abs icookie-collection->last-tin dll-next dll-previous] 32))
  285.  
  286. (defun collection-refresh (collection) "\
  287. Refresh all cookies in COLLECTION.
  288.  
  289. The pretty-printer that was specified when the COLLECTION was created
  290. will be called for all cookies in COLLECTION.
  291.  
  292. Note that tin-invalidate is more efficient if only a small
  293. number of cookies needs to be refreshed." (byte-code "p
  294. É    !Ê
  295. !Ë
  296. !Ì    !qˆÍŽÇÎÏÐ Ñ\"ÒH!ÏÒH!\"ˆÏÒH!bˆÐ Ñ\"=?…dÓÏÒH!`\"ˆÔÕ
  297. !ÖÒH!\"ˆ×cˆØ \"‰ˆ‚7))ˆÓÏÒH!`\")-‡" [old-buffer collection collection dll header footer buffer-read-only nil tin icookie-collection->dll icookie-collection->header icookie-collection->footer icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) delete-region icookie-wrapper->start-marker dll-nth 1 2 set-marker funcall icookie-collection->pretty-printer icookie-wrapper->cookie "
  298. " dll-next] 20))
  299.  
  300. (defun tin-invalidate (collection &rest tins) "\
  301. Refresh some cookies. Args: COLLECTION &rest TINS.
  302. The pretty-printer that for COLLECTION will be called for all TINS." (byte-code "p
  303. Å    !Æ    !qˆÇŽ …!È
  304. @\"ˆ A‰ˆ‚)+‡" [old-buffer collection collection dll tins icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) icookie-refresh-tin] 6))
  305.  
  306. (defun collection-set-goal-column (collection goal) "\
  307. Set goal-column for COLLECTION.
  308. Args: COLLECTION GOAL.
  309. goal-column is made buffer-local.
  310.  
  311. There will eventually be a better way to specify the cursor position." (byte-code "p
  312. Æ    !Ç    !qˆÈŽÉÄ!ˆ‰)+‡" [old-buffer collection collection dll goal-column goal icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) make-local-variable] 5))
  313.  
  314. (defun tin-goto-previous (collection pos arg) "\
  315. Move point to the ARGth previous cookie.
  316. Don't move if we are at the first cookie, or if COLLECTION is empty.
  317. Args: COLLECTION POS ARG.
  318. Returns the tin we move to." (byte-code "p
  319. Ë    !Ì
  320. Í
  321. !#Π   !qˆÏŽ …{ …#ÐV…7S‰ˆÑ \"‰ˆ‚ˆ
  322. Ò!=†OÓ!=ƒVɂX*?…cÔ Õ\"‰ˆÖ ×H!bˆ
  323. …tØ
  324. !ˆÙ
  325. \"ˆ ),‡" [old-buffer collection collection dll tin pos arg tin tmpcollection nil goal-column icookie-collection->dll tin-locate icookie-collection->last-tin icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) 0 dll-previous icookie-collection->header icookie-collection->footer dll-nth 1 icookie-wrapper->start-marker 2 move-to-column icookie-set-collection->last-tin] 13))
  326.  
  327. (defun tin-goto-next (collection pos arg) "\
  328. Move point to the ARGth next cookie.
  329. Don't move if we are at the last cookie.
  330. Args: COLLECTION POS ARG.
  331. Returns the tin." (byte-code "p
  332. Ë    !Ì
  333. Í
  334. !#Π   !qˆÏŽ …ÐV…3S‰ˆÑ \"‰ˆ‚ˆ
  335. Ò!=†KÓ!=ƒRɂT*?…_Ô Õ\"‰ˆÖ ×H!bˆ
  336. …pØ
  337. !ˆÙ
  338. \"ˆ ),‡" [old-buffer collection collection dll tin pos arg tin tmpcollection nil goal-column icookie-collection->dll tin-locate icookie-collection->last-tin icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) 0 dll-next icookie-collection->header icookie-collection->footer dll-nth -2 icookie-wrapper->start-marker 2 move-to-column icookie-set-collection->last-tin] 13))
  339.  
  340. (defun tin-goto (collection tin) "\
  341. Move point to TIN.  Args: COLLECTION TIN." (byte-code "p
  342. Æ    !Ç    !qˆÈŽÉ ÊH!bˆ…Ë!ˆÌ
  343. \")+‡" [old-buffer collection collection dll tin goal-column icookie-collection->dll icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) icookie-wrapper->start-marker 2 move-to-column icookie-set-collection->last-tin] 7))
  344.  
  345. (defun collection-collect-tin (collection predicate &rest predicate-args) "\
  346. Select cookies from COLLECTION using PREDICATE.
  347. Return a list of all selected tins.
  348.  
  349. PREDICATE is a function that takes a cookie as its first argument.
  350.  
  351. The tins on the returned list will appear in the same order as in the
  352. buffer.  You should not rely on in which order PREDICATE is called.
  353.  
  354. Note that the buffer the COLLECTION is displayed in is current-buffer
  355. when PREDICATE is called.  If PREDICATE must restore current-buffer if
  356. it changes it.
  357.  
  358. If more than two arguments are given to collection-collect-tin the remaining
  359. arguments will be passed to PREDICATE." (byte-code "p
  360. Ê    !Ë
  361. !Ì Í\"ÇΠ   !qˆÏŽ =?…BÐÑÒH!    #…7B‰ˆÓ \"‰ˆ‚ˆ).‡" [old-buffer collection collection dll header tin result nil predicate predicate-args icookie-collection->dll icookie-collection->header dll-nth -2 icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) apply icookie-wrapper->cookie 2 dll-previous] 10))
  362.  
  363. (defun collection-collect-cookie (collection predicate &rest predicate-args) "\
  364. Select cookies from COLLECTION using PREDICATE.
  365. Return a list of all selected cookies.
  366.  
  367. PREDICATE is a function that takes a cookie as its first argument.
  368.  
  369. The cookies on the returned list will appear in the same order as in
  370. the buffer.  You should not rely on in which order PREDICATE is
  371. called.
  372.  
  373. Note that the buffer the COLLECTION is displayed in is current-buffer
  374. when PREDICATE is called.  If PREDICATE must restore current-buffer if
  375. it changes it.
  376.  
  377. If more than two arguments are given to collection-collect-cookie the
  378. remaining arguments will be passed to PREDICATE." (byte-code "p
  379. É    !Ê
  380. !Ë Ì\"ÍΠ   !qˆÏŽ =?…FÐÑÒH!#…;ÑÒH!B‰ˆÓ \"‰ˆ‚ˆ).‡" [old-buffer collection collection dll header tin result predicate predicate-args icookie-collection->dll icookie-collection->header dll-nth -2 nil icookie-collection->buffer ((byte-code "q‡" [old-buffer] 1)) apply icookie-wrapper->cookie 2 dll-previous] 11))
  381.  
  382. (defun cookie-sort (collection predicate) "\
  383. Sort the cookies in COLLECTION, stably, comparing elements using PREDICATE.
  384. PREDICATE is called with two cookies, and should return T
  385. if the first cookie is \"less\" than the second.
  386.  
  387. All cookies will be refreshed when the sort is complete." (byte-code "ÃÁ\"ˆÄÅÆ!
  388. \"Ç!ˆ\"‡" [collection nil predicate icookie-set-collection->last-tin collection-append-cookies sort collection-list-cookies collection-clear] 8))
  389.  
  390. (defun collection-buffer (collection) "\
  391. Return the buffer that is associated with COLLECTION.
  392. Returns nil if the buffer has been deleted." (byte-code "à   !Ä!ƒ‚Â)‡" [buf collection nil icookie-collection->buffer buffer-name] 3))
  393.